use core::panic::PanicInfo;

use crate::processor::cpu_relax;
use crate::{print, println};

#[panic_handler]
pub fn panic_handler(info: &PanicInfo) -> ! {
    print!("panic: ");

    let message = info.message();
    if let Some(m) = message {
        println!("{}", m);
    }
    loop {
        cpu_relax();
    }
}
